﻿using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace MyFloridaHouse.libSvCommonUtilities.Converters
{
    //[ValueConversion(typeof(int), typeof(int))]
    public class ConvertDataGridHeightFromInt : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            GridLength newHeight;
            int myInt = (int)value;
            if (myInt > 0)
            {
                newHeight = new GridLength(150);
            }
            else
            {
                newHeight = new GridLength(0);
            }
            return newHeight;

        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {

            throw new NotImplementedException();
        }

    }
}
